package com.yanqu.road.entity.estatewar.palace;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.decoration.DecorationSimple;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class PalaceFloorInfo extends DataObject {
    private int activityId;
    private int pos;
    private long userId;
    private BigInteger totalAbility;
    private long modifyTime;
    private List<DecorationSimple> decorationSimpleList = new ArrayList<>();

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int pos) {
        if(this.pos != pos) {
            this.pos = pos;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public BigInteger getTotalAbility() {
        return totalAbility;
    }

    public void setTotalAbility(BigInteger totalAbility) {
        if(!Objects.equals(this.totalAbility, totalAbility)) {
            this.totalAbility = totalAbility;
            setUpdateOption();
        }
    }

    public long getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(long modifyTime) {
        if(this.modifyTime != modifyTime) {
            this.modifyTime = modifyTime;
            setUpdateOption();
        }
    }

    public List<DecorationSimple> getDecorationSimpleList() {
        return decorationSimpleList;
    }

    public String getDecorationSimpleListJsonStr(){
        if(null == decorationSimpleList){
            return "[]";
        }else {
            return JSON.toJSONString(decorationSimpleList);
        }
    }

    public void setDecorationSimpleList(List<DecorationSimple> decorationSimpleList) {
        this.decorationSimpleList = decorationSimpleList;
        setUpdateOption();
    }
}
